$(document).ready(function(){

	$.ajax({
		type: "POST",
		url: '/web/bi/finance/getBiFinancialFundsJson',
		async: true,
		success: function (data) {
			console.log('data',data);
			if (data.code == 0) {
				var biFinancialFundsList = data.biFinancialFundsList;
				var tableTbody = '';
				for (let i = 0; i < biFinancialFundsList.length; i++) {
					var row = biFinancialFundsList[i];
					tableTbody += `
								<tr>
									<td style="text-align:center;">`+ row.code + `</td>
									<td style="text-align:center;">`+ row.accountTypeName + `</td>
									<td style="text-align:center;">`+ row.vname + `</td>
									<td style="text-align:center;">`+ row.currencyCode + `</td>
									<td style="text-align:center;">`+ row.amount + `</td>
									<td style="text-align:center;">`+ row.yesterdayIncome + `</td>
									<td style="text-align:center;">`+ row.yesterdayOutgo + `</td>
									<td style="text-align:center;">`+ row.remark1 + `</td>
								</tr>
								`;
				}
				//刷新时间
				$('#updateTime1').text(data.updateTime1);
				//金额
				$('#cny').text(data.cny);
				$('#cnh').text(data.cnh);
				$('#usd').text(data.usd);
				$('#eur').text(data.eur);
				$('#gbp').text(data.gbp);
				$('#other').text(data.other);
				if (biFinancialFundsList.length != 0) $('#mytable1').html(tableTbody);

			} else {
				alert(data.msg);
			}
		}, error: function() {
			alert("操作失败，请稍后再试！", { icon: 2 });
		}
	});
});

